package com.caifu.mapper;

import com.caifu.pojo.SysOrganization;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 * 组织架构表 Mapper 接口
 * </p>
 *
 * @author tww
 * @since 2021-03-01
 */
public interface SysOrganizationMapper extends BaseMapper<SysOrganization> {


    /**
     * 根据用户id获取组织节点
     * @param id
     * @return
     */
    List<SysOrganization> selectOrgListByUserId(Integer id);

    /**
     * 根据id查询所有子节点
     *
     * @param id
     * @return
     */
    List<SysOrganization> selectChildrenOrgById(Integer id);
}
